package cn.seaboot.admin.upload.utils;

import org.springframework.web.multipart.MultipartFile;

/**
 * 文件有效性验证，确保请求域中的文件是有处理必要的
 *
 * Client maybe upload a file which size is zero. oh well, it doesn't need to save, so, need have a checked.
 *
 * @author Mr.css
 * @version 2020-05-13 10:47
 */
public interface MultipartFileValidator {

    /**
     * check file if valid or not
     *
     * @param file MultipartFile
     * @return boolean
     */
    boolean isValid(MultipartFile file);
}
